package com.app.mapper;

import com.app.model.IntegralRecordModel;
import com.app.vo.RankingVo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

/**
 * 积分记录
 * @author 16693103420
 * @since 2024-01-25
 */
@Mapper
public interface IntegralRecordMapper extends BaseMapper<IntegralRecordModel> {
    /**
     * 积分排行榜
     *
     * @return
     */
    List<RankingVo> integralRanking();

    /**
     * 积分的详情查询
     *
     * @param id
     * @return
     */
    IntegralRecordModel selectByIdWithPhone(Integer id);

    BigDecimal queryPointsSummaryData(@Param("keyword") String keyword,
                                      @Param("beginTime") String beginTime,
                                      @Param("endTime") String endTime,
                                      @Param("areaId") Integer areaId,
                                      @Param("businessId") Integer businessId,
                                      @Param("typeName") String typeName);
}